#include "RGB_Belt.h"
#include "offline_manage.h"

void RGB_Ctr_Task(void)
{
	uint8_t buf[8] = {0};
	uint8_t warm = 0xff,cold = 0,red = 0xff,green = 0xff,blue = 0xff;
	if(GetHangarErr()!=SYS_OK){
		{red = 0xff;green = 0;blue = 0;cold = 0,warm = 0;}
		buf[0] = _5HZ;
		buf[1] = 254;
		buf[2] = _FLASH;
		buf[3] = cold;
		buf[4] = warm;
		buf[5] = blue;
		buf[6] = green;
		buf[7] = red;
	}
	else{
		{red = 0;green = 0XFF;blue = 0;cold = 0,warm = 0xff;}
		buf[0] = _1HZ;
		buf[1] = 254;
		buf[2] = _BREATH;
		buf[3] = cold;
		buf[4] = warm;
		buf[5] = blue;
		buf[6] = green;
		buf[7] = red;
	}
	CAN2_TX_PACKET(LED_BOARD,buf,sizeof(buf));
}




